1. Field of the Invention
The present invention is concerned with the selection of a subset of identifiers from within a range of identifiers. In particular the present invention is concerned with the selection of 2M identifiers within a range of up to 2N identifiers, where M is less than or equal to N.
2. Description of the Prior Art
There may be various situations in which it is required to select a subset of identifiers from a range of identifiers, for example in a tracing unit which monitors the activity of a processor core, the processor core may be configured to issue data indicative of its activities to the tracing unit over a number of different channels. In such a situation, it may be desired to filter those channels, so that only a subset of all possible channels are actively monitored and have their associated information converted into a trace stream for output. Another such situation is the use of a large number of addresses, where it is desired to monitor only a subset of those addresses, for example in a watchpoint unit embedded within a processor core. Typically such identifiers are defined by a sequence of bits, such that up to 2N identifiers may be defined by N bits.
In order to select a subset of identifiers (e.g. the above mentioned channel or addresses) various techniques are known. For example, it is known to configure a register to define an identifier of interest, such that when use of that identifier occurs a match with the identifier as defined in the register may trigger a suitable response. More generally, it is known to provide a number of such registers corresponding to a number of identifiers of interest, such that when any of those identifiers are used the corresponding response may be triggered. However, this approach has the disadvantage that if a large number of identifiers form the subset of interest it will be necessary to provide a corresponding large number of registers defining those selected identifiers. In other words, this approach can be expensive to implement in hardware.
It is also known to select a range of identifiers by defining a starting identifier and an end identifier, using a register for each, wherein any identifier falling within the range spanned by the start identifier and end identifier is selected. However, this approach not only requires two registers of equal size to the identifier space to identify the upper and lower limit, but also further and more complex comparison units configured to determine if a given identifier falls within the range. In other words, this approach can be expensive to implement in hardware.
It is also known to select a range of identifiers by defining a base identifier and a window size, for example a N-bit base identifier and a log2(N) bit window size. However, this approach requires a configuration register for each, and further logic to determine if a given identifier falls within the defined window. In other words, this approach can be expensive to implement in hardware.
In some situations where such a subset of identifiers is required to be monitored, for example in system-on-chip (SoC) arrangement, space may be at a premium, and consequently it is desirable to be able to define and identify the subset of identifiers as efficiently as possible.
Hence it would be desirable to provide an improved manner of efficiently selecting a subset of identifiers from within a possible range of up to 2N identifiers.